
public class Test {
    public static void main(String[] args) {
        run();
    }

    public static void run() {
        int mark=0;
        for (int i=0;i<10;i++){
            System.out.println("你可以玩"+(10-i)+"次,错一次扣一分，对一次加3分，平一次加一分");
            Player h = new Player();//人猜
            String f = h.gues();
            Finger g = new Finger();//机猜
            String s = g.gues();
            System.out.println("你的答案"+f);
            System.out.println("正确答案"+s);
            if (s.equals(f)){
                mark+=1;
            }else if (s.equals("剪刀")&&f.equals("布")){
                mark-=1;
            }else if (s.equals("剪刀")&&f.equals("石头")){
                mark+=3;
            }else if (s.equals("石头")&&f.equals("布")){
                mark+=3;
            }else if (s.equals("石头")&&f.equals("剪刀")){
                mark-=1;
            }else if (s.equals("布")&&f.equals("剪刀")){
                mark+=3;
            }else {
                mark-=1;
            }
            if (i<9){
                System.out.println("目前得分"+mark);
            }
        }
        if (mark>=10){
            System.out.println("得分"+mark);
            System.out.println("恭喜挑战成功");
        }else {
            System.out.println("得分"+mark);
            System.out.println("垃圾");
        }
    }
}
